﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<title>sample16</title>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
		<script type="text/javascript">
$(function(){
	$("a").click(function(){
		$("img").attr("src",$(this).attr("href")).attr("alt",$(this).text());
		return false;
	});
	$("button").click(function(){
		$("ul").append("<li><a href='Building.jpg'>건물</a></li>");
	});
});
		</script>
	</head>
	<body>
		<button>li 요소를 추가</button>
	<ul> 
		<li><a href="flower.jpg"> 꽃</a></li>
		<li><a href="sea.jpg"> 바다</a></li>	
		<li><a href="jellyfish.jpg"> 해파리</a></li>
	</ul>
		<p><img src="flower.jpg" alt=" 꽃" /></p>

	</body>
</html>